﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HoaDonTrongNgay.ascx.cs"
    Inherits="HoaDonTrongNgay" %>
<center>
    <asp:Panel ID="pnGridMaster" runat="server" Width="700px">
        Chọn ngày:
        <input type="text" class="TextBoxGachDuoi" runat="server" id="txtNgay" 
            onfocus="showCalendarControl(this);" style="width: 69px" />
        <asp:LinkButton ID="cmdXem" runat="server" OnClick="cmdXem_Click" Text="Xem"></asp:LinkButton>
        &nbsp;&nbsp;&nbsp;&nbsp; <a href="Default.aspx?PageId=70">Thêm hóa đơn</a>
        <br />
        <center>
            <asp:Literal runat="server" ID="lblSoLuongHoaDon"></asp:Literal>
            <asp:DataGrid ID="masterGrid" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                OnItemCommand="masterGrid_ItemCommand" OnItemDataBound="masterGrid_ItemDataBound"
                OnPageIndexChanged="masterGrid_PageIndexChanged" PageSize="15" Width="100%">
                <PagerStyle Mode="NumericPages" />
                <AlternatingItemStyle CssClass="DarkRow" />
                <ItemStyle CssClass="LightRow" />
                <Columns>
                    <asp:BoundColumn HeaderText="M&#227; H&#243;a đơn" DataField="MaHoaDon"></asp:BoundColumn>
                    <asp:TemplateColumn HeaderText="Số tiền" ItemStyle-HorizontalAlign="Right">
                        <ItemTemplate>
                            <%# TTQT.TTQT_Code.TTQTCommon.formatTien_KhongThapPhan(Eval("TongTien").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn HeaderText="Khách hàng" DataField="TenKhachHang"></asp:BoundColumn>
                    <asp:BoundColumn HeaderText="Người bán" DataField="UserName"></asp:BoundColumn>
                    <asp:BoundColumn HeaderText="Cửa hàng" DataField="maCN"></asp:BoundColumn>
                    <asp:TemplateColumn>
                        <ItemTemplate>
                            <input type="button" onclick="openPageXemGiaoDich('GiaoDich/InPhieuXuatKho.aspx?MaHoaDon=<%# Eval("MaHoaDon").ToString()%>'); return false;" value="Chi tiết" width="60" />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateColumn>
                </Columns>
                <HeaderStyle CssClass="HeaderRow" Font-Bold="True" />
            </asp:DataGrid>
        </center>
        <asp:SqlDataSource ID="dsMaster" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="ds" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
            ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"></asp:SqlDataSource>
    </asp:Panel>
</center>
